import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const router =new VueRouter({
    routes:[
        // 重定向到首页
        {path:'/',redirect:'home'},
        {path:'/home',component:()=>import ('../layout'),children:[
            {path:'play/:id'},
            {path:'playVideo/:id'},
            {path:'dj/:id'},
            {path:'search/:type'}
        ]},
        {path:'*',component:()=>import('../pages/404')}

    ],
    mode:'history',
    linkActiveClass:'active'
})
export default router